import Mock from 'mockjs'
// 扫雷列表
export const getThunder = () => {
    const data = {
        code: 0,
        data: {
            "danger|5": [
                {
                    "id": "@id",
                    "name|1": [
                        '领益智造',
                        '沃尔核柴',
                        '百邦科技',
                        '五粮液',
                        '山西汾酒',
                        '今世缘',
                        '泸州老窖',
                        '江苏银行',
                        '招商公路',
                        '长城汽车',
                    ],
                    "count|1-10": 100,
                    "status": "危险",
                }
            ],
            "vigilant|5": [
                {
                    "id": "@id",
                    "name|1": [
                        '科创新能源ETF',
                        '科创医药ETF',
                        '科创芯片EFT博时',
                        '电网设备EFT',
                        '油气EFT基金',
                        '港股创新药50EFT',
                        '恒生消费指数EFT',
                        '长城汽车',
                    ],
                    "count|1-10": 100,
                    "status": "警惕",
                }
            ],
            "notice|5": [
                {
                    "id": "@id",
                    "name|1": [
                        '升24转债',
                        '宏柏转债',
                        '伟24转债',
                        '益丰转债',
                        '龙星转债',
                        '楚天转债',
                        '卡倍转债',
                        '东南转债',
                    ],
                    "count|1-10": 100,
                    "status": "注意",
                }
            ],
        }
    };
    const res = Mock.mock(data);
    return Promise.resolve(res.data);
}

// 扫雷统计
export const getStatistics = () => {
    const data = {
        code: 0,
        data: {
            "danger|10-50": 10,
            "vigilant|10-50": 10,
            "notice|10-55": 10,
            "date": Mock.mock('@datetime("yyyy-MM-dd")')
        }
    };
    const res = Mock.mock(data);
    return Promise.resolve(res.data);
}

// 历史避险列表
export const getSearchList = () => {
    const data = {
        code: 0,
        "data|10": [
            {
                "id": "@id",
                "name|1": [
                    '领益智造',
                    '沃尔核柴',
                    '百邦科技',
                    '五粮液',
                    '山西汾酒',
                    '今世缘',
                    '泸州老窖',
                    '江苏银行',
                    '招商公路',
                    '长城汽车',
                ],
                "yearEarning|1-80.2": 100,
                "overage|1-100.2": 100,
                date: "@datetime"

            }
        ],
    };
    const res = Mock.mock(data);
    return Promise.resolve(res.data);
}

